{{define "base"}}
<!DOCTYPE html>
<html lang="en" {{ with .Theme }}data-theme="{{ . }}"{{ end }}>
  <head>
    {{ if $.Debug }}
      <link href="/css/01-pico.css" rel="stylesheet" />
      <link href="/css/02-icss.css" rel="stylesheet" />
      <link href="/css/03-icons.css" rel="stylesheet" />
      <link href="/css/99-twtxt.css" rel="stylesheet" />
      <link rel="icon" type="image/png" href="/img/favicon.png" />
    {{ else }}
      <link href="/css/{{ .Commit }}/twtxt.min.css" rel="stylesheet" />
      <link rel="icon" type="image/png" href="/img/{{ .Commit}}/favicon.png" />
    {{ end }}

    {{ range .Alternatives }}
      <link rel="alternate" type="{{ .Type }}" title="{{ .Title }}" href="{{ .URL }}" />
    {{ end }}

    {{ range .Links }}
      <link href="{{ .Href }}" rel="{{ .Rel }}" />
    {{ end }}
    
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <title>{{ .InstanceName }} {{ .Title }}</title>
    {{ with .Meta.Title }}<meta name="title" content="{{ . }}">{{ end }}
    {{ with .Meta.Author }}<meta name="author" content="{{ . }}">{{ end }}
    {{ with .Meta.Keywords }}<meta name="keywords" content="{{ . }}">{{ end }}
    {{ with .Meta.Description }}<meta name="description" content="{{ . }}">{{ end }}

    <!-- OpenGraph Meta Tags -->
    {{ with .Meta.Title }}<meta property="og:title" content="{{ . }}">{{ end  }}
    {{ with .Meta.Description }}<meta property="og:description" content="{{ . }}">{{ end  }}
    {{ with .Meta.UpdatedAt }}<meta property="og:updated_time" content="{{ . }}" />{{ end  }}
    {{ with .Meta.Image }}<meta property="og:image" content="{{ . }}">{{ end  }}
    {{ with .Meta.URL }}<meta property="og:url" content="{{ . }}">{{ end  }}
    <meta property="og:site_name" content="{{ .InstanceName }}">
  </head>
<body>
  <nav id="mainNav" class="container-fluid">
    <ul>
      <li class="mobile-menu">
        <a id="burgerMenu" href="javascript:void(0);">
          <i class="icss-bars"></i>
        </a>
      </li>
      <li class="logo">
        <a href="/" class="contrast">
          <svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 449 249.1" style="enable-background:new 0 0 449 249.1;" height="3.5rem">
            <path fill="currentColor" d="m73.1 156.6v-93.3h-48.4v-22.2h122.8v22.2h-48.5v93.3z"></path>
            <path fill="currentColor" d="m320.7 64.8v-25.9h-25.7v25.9h-4.8l-9.3 20.5h14.1v71.3h25.7v-71.3h29v-20.5z"></path>
            <path fill="currentColor" d="m277.2 64.8h-17l-27.8 61.8-24.9-54.9c-1.5-3.3-3.2-5.7-5.2-7.2s-4.9-2.3-8.5-2.3c-3.7 0-6.6.8-8.6 2.5-2 1.6-3.8 4-5.3 7l-26.2 54.9-22.6-53h-25.5l32.9 76.3c1.2 2.8 2.8 5.1 4.8 6.7s4.9 2.5 8.7 2.5c3.4 0 6.2-.8 8.6-2.5 2.3-1.6 4.1-3.9 5.5-6.7l27.3-56.6 25.9 56.6c1.2 2.6 3 4.8 5.3 6.5 2.3 1.8 5.1 2.6 8.4 2.6 3.4 0 6.2-.9 8.6-2.6 2.3-1.7 4.1-3.9 5.3-6.5l29.1-64.6 9.2-20.5z"></path>
            <path fill="currentColor" d="m128.5 166.1v9.5h-1c-.8-3-1.8-5-3-6.1s-2.8-1.6-4.6-1.6c-1.4 0-2.6.4-3.4 1.1-.9.8-1.3 1.6-1.3 2.5 0 1.1.3 2.1 1 2.9.6.8 1.9 1.7 3.9 2.7l4.4 2.2c4.1 2 6.2 4.6 6.2 8 0 2.5-1 4.6-2.9 6.1-1.9 1.6-4.1 2.3-6.5 2.3-1.7 0-3.6-.3-5.8-.9-.7-.2-1.2-.3-1.7-.3s-.8.3-1.1.8h-1v-10h1c.6 2.9 1.7 5 3.3 6.4s3.4 2.2 5.4 2.2c1.4 0 2.5-.4 3.4-1.2s1.3-1.8 1.3-3c0-1.4-.5-2.6-1.5-3.5s-3-2.2-5.9-3.6c-2.9-1.5-4.9-2.8-5.8-4s-1.4-2.6-1.4-4.4c0-2.3.8-4.2 2.4-5.8 1.6-1.5 3.6-2.3 6.1-2.3 1.1 0 2.5.2 4 .7 1 .3 1.7.5 2 .5s.6-.1.8-.2.4-.4.7-.9h1z"></path>
            <path fill="currentColor" d="m152.3 166.1c4.2 0 7.6 1.6 10.2 4.8 2.2 2.8 3.3 5.9 3.3 9.5 0 2.5-.6 5-1.8 7.6s-2.8 4.5-4.9 5.8-4.4 2-7.1 2c-4.2 0-7.5-1.7-10-5-2.1-2.8-3.1-6-3.1-9.5 0-2.6.6-5.1 1.9-7.7s2.9-4.4 5-5.6c2-1.3 4.2-1.9 6.5-1.9zm-.9 2c-1.1 0-2.1.3-3.2 1-1.1.6-2 1.8-2.7 3.4s-1 3.7-1 6.2c0 4.1.8 7.6 2.4 10.5s3.8 4.4 6.4 4.4c2 0 3.6-.8 4.9-2.4s1.9-4.4 1.9-8.4c0-5-1.1-8.9-3.2-11.8-1.4-1.9-3.3-2.9-5.5-2.9z"></path>
            <path fill="currentColor" d="m197.5 184.3c-.8 3.7-2.2 6.5-4.4 8.5s-4.6 3-7.3 3c-3.2 0-6-1.3-8.3-4-2.4-2.7-3.5-6.3-3.5-10.8 0-4.4 1.3-8 3.9-10.7s5.8-4.1 9.4-4.1c2.8 0 5 .7 6.8 2.2s2.7 3 2.7 4.5c0 .8-.3 1.4-.8 1.9s-1.2.7-2.1.7c-1.2 0-2.1-.4-2.7-1.1-.3-.4-.5-1.2-.7-2.4-.1-1.2-.5-2.1-1.2-2.7s-1.7-.9-3-.9c-2 0-3.7.7-4.9 2.2-1.6 2-2.5 4.6-2.5 7.9s.8 6.3 2.4 8.8c1.6 2.6 3.8 3.8 6.7 3.8 2 0 3.8-.7 5.3-2 1.1-.9 2.2-2.6 3.3-5.1z"></path>
            <path fill="currentColor" d="m215.1 166.1v22.4c0 1.8.1 2.9.4 3.5s.6 1 1.1 1.3 1.4.4 2.7.4v1.1h-13.6v-1.1c1.4 0 2.3-.1 2.7-.4.5-.3.8-.7 1.1-1.3s.4-1.8.4-3.5v-10.8c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.2-.1-5.1-.2-5.8s-.4-1.2-.7-1.5-.7-.4-1.2-.4-1.2.2-2 .5l-.5-1.1 8.3-3.4z"></path>
            <path fill="currentColor" d="m102.6 186.7c1.3 0 2.4.4 3.2 1.3.9.9 1.3 1.9 1.3 3.2 0 1.2-.4 2.3-1.3 3.2s-1.9 1.3-3.2 1.3c-1.2 0-2.3-.4-3.2-1.3s-1.3-2-1.3-3.2c0-1.3.4-2.3 1.3-3.2.9-.8 2-1.3 3.2-1.3z"></path>
          </svg>
        </a>
      </li>
      {{ if .Authenticated }}
        <li>
          <a href="/">
            <i class="icss-chat"></i>
            Timeline
          </a>
        </li>
        <li>
          <a href="/discover">
            <i class="icss-users"></i>
            Discover
          </a>
        </li>
        <li>
          <a href="/mentions">
            <i class="icss-smiley"></i>
            Mentions
          </a>
        </li>
        <li>
          <a href="/feeds">
            <i class="icss-rss"></i>
            Feeds
          </a>
        </li>
      {{ end }}
    </ul>
    <ul>
      {{ if .Authenticated }}
        <li>
          <a href="/follow">
            <i class="icss-plus"></i>
            Follow
          </a>
        </li>
        <li>
          <a class="secondary" href="/settings">
            <i class="icss-gear"></i>
            Settings
          </a>
        </li>
        <li>
          <a class="secondary" href="/logout">
            <i class="icss-exit"></i>
            Logout
          </a>
        </li>
      {{ else }}
        <li>
          <a href="/login">
            <i class="icss-key"></i>
            Login
          </a>
        </li>
        {{ if .RegisterDisabled }}
          <li>
            <a href="#" data-tooltip="{{ with .RegisterDisabledMessage }}{{ .RegisterDisabledMessage }}{{ else }}Registrations are disabled on this instance. Please contact the operator.{{ end }}">
              <i class="icss-exclamation-circle" style="color:red;"></i>
              Register
            </a>
          </li>
        {{ else }}
          <li>
            <a href="/register">
              <i class="icss-smiley"></i>
              Register
            </a>
          </li>
        {{ end }}
      {{ end }}
    </ul>
  </nav>
  <main class="container">
    {{template "content" . }}
  </main>
  <footer>
    <div class="container">
      <small>
        <div class="footer-copyright"><a href="https://github.com/jointwt/twtxt" target="_blank">twtxt v{{ .SoftwareVersion }}</a>
            ·
            Created with 💚 by <a att href="https://github.com/prologic" target="_blank">James Mills</a>
            ·
            &copy; 2020 <a href="https://github.com/prologic" target="_blank">James Mills</a>. All rights reserved.
        </div>
        <div class="footer-menu">
          <a href="/about" target="_blank" class="menu-item">About</a>
          <a href="/privacy" target="_blank" class="menu-item">Privacy</a>
          <a href="/abuse" target="_blank" class="menu-item">Abuse</a>
          <a href="/help" target="_blank" class="menu-item">Help</a>
          <a href="/support" target="_blank" class="menu-item">Support</a>
          <a href="/atom.xml" target="_blank">Atom&nbsp;<i class="icss-rss"></i></a>
        </div>
      </small>
    </div>
  </footer>
  {{ if $.Debug }}
    <script type="application/javascript" src="/js/01-umbrella.js"></script>
    <script type="application/javascript" src="/js/02-polyfill.js"></script>
    <script type="application/javascript" src="/js/03-twix.js"></script>
    <script type="application/javascript" src="/js/99-twtxt.js"></script>
    <script type="application/javascript" src="/js/ie11CustomProperties.min.js"></script>
  {{ else }}
    <script type="application/javascript" src="/js/{{ .Commit }}/twtxt.min.js"></script>
  {{ end }}
</body>
</html>
{{end}}
